{% load staticfiles %}

<!DOCTYPE html>
<html lang="en">
<head>

</head>
<body>
    <form id="go_back" method="get" accept-charset="utf-8" action="/">
        <button type="submit" name="back">Go back</button>
    </form>
    <h1>{{ movie.name }}:</h1>
    <div id="movie_detail">
        Rating: {{ movie.movielens_rating|floatformat:2 }} by {{ movie.movielens_num_ratings }} users<br>
        Top 10 Tags: {{ movie.tags }}<br>
        {% if movie.liked_or_not is True %}
        You LIKED this movie
        {% elif movie.liked_or_not is False %}
        You DISLIKED this movie
        {% else %}
        You haven't rated this movie yet
        {% endif %}<br>
        IMDB: <a href="http://www.imdb.com/title/tt{{ links.imdb }}">{{ links.imdb }}</a><br><br>
        <form id="liked_or_not" method="post" accept-charset="utf-8" action="/update/{{ movie.id }}/">
            {% csrf_token %}
            <button type="submit" name="liked">Liked it!</button>
            <button type="submit" name="disliked">Didn't like it</button>
            <button type="submit" name="reset">Reset</button>
        </form>
        <br>
        <br>
        {% if movie.relatable %}
        Similar movies you have not yet watched:<br>
        {% for movie_title, movie_id in similarities %}
        <a href="/{{ movie_id }}/"> {{ movie_title }}</a><br>
        {% endfor %}
        {% else %}
        Unfortunately this movie has no tags and cannot be related to other movies
        {% endif %}
    </div>
</body>
</html>